package com.huixue.cn.ztej.bean;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.huixue.cn.ztej.utils.annotation.ColumnDefination;
import com.huixue.cn.ztej.utils.annotation.Comment;
import com.huixue.cn.ztej.utils.annotation.Table;

/**
 * Represents a request information from client
 * 
 * @author muzhanqiang
 */
@Table(name = "t_menu", indexes = "index ${index_name} using hash (menu_id)", constraints = "constraint primary key(menu_id)")
@Comment("微信的菜单信息，用于在微信客户端显示")
public class Menu{

	@Comment("id")
	@ColumnDefination(column = "menu_id", options = "not null", type = "varchar(40)", primary = true)
	private String menuId;

	@Comment("系统id")
	@ColumnDefination(column = "system_id", options = "not null", type = "varchar(40)")
	private String systemId;

	@Comment("菜单名称")
	@ColumnDefination(column = "menu_name", options = "not null", type = "varchar(40)")
	private String menuName;

	@Comment("父菜单，一级菜单为-1，其他的为父模块的id")
	@ColumnDefination(column = "parent", type = "varchar(40)")
	private String parent;

	@Comment("菜单类型：01：查看，返回url；00：事件，返回信息；空：没有事件，打开子菜单")
	@ColumnDefination(column = "menu_type", type = "varchar(10)")
	private String menuType = "";

	@Comment("菜单排序,按数字排序")
	@ColumnDefination(column = "menu_order", type = "int")
	private int menuOrder;

	@Comment("菜单链接地址，查看类型的菜单必输")
	@ColumnDefination(column = "menu_url", type = "varchar(300)")
	private String menuUrl;

	@Comment("菜单点击触发的事件")
	@ColumnDefination(column = "menu_key", type = "varchar(150)")
	private String menuKey;

	@Comment("创建时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ColumnDefination(column = "create_time", type = "datetime")
	private Date createTime;

	@Comment("更新时间")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ColumnDefination(column = "update_time", type = "datetime")
	private Date updateTime;

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getSystemId() {
		return systemId;
	}

	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}

	public String getMenuType() {
		return menuType;
	}

	public void setMenuType(String menuType) {
		this.menuType = menuType;
	}

	public int getMenuOrder() {
		return menuOrder;
	}

	public void setMenuOrder(int menuOrder) {
		this.menuOrder = menuOrder;
	}

	public String getMenuUrl() {
		return menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	public String getMenuKey() {
		return menuKey;
	}

	public void setMenuKey(String menuKey) {
		this.menuKey = menuKey;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
